<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8" />
    <title>Welcome</title>
    <!--#include file="common/head.html" -->
    <style>
        html, body, body>table {
            height: 100%;
        }

        .main {
            width: 100%;
            min-height: 600px;
            text-align: left;
        }

        h1 {
            font-size: 18pt;
            border-bottom: 1px solid lightgray;
            padding: 10px 0;
        }

        table.tj {
            width: 100%;
            margin: 20px 0;
        }

        th,td{text-align:center;padding:1%;}
    </style>
</head>
<body>
<div class="container">
    <div id="main">
        <br />
        <br />
        <br />
        <br />
        <h1>欢迎使用 SSO 管理中心 Welcome</h1>
        <table class="aj-table even tj">
            <tr>
                <th>租户数</th>
                <th>客户端数</th>
                <th>用户数量</th>
                <th>已登录用户数量</th>
                <th>登录次数</th>
            </tr>

            <tr>
                <td>{{info.tenantNum}}</td>
                <td>{{info.clientNum}}</td>
                <td>{{info.userNum}}</td>
                <td>{{info.onlineNum}}</td>
                <td>{{info.loginTimes}}</td>
            </tr>
        </table>
    </div>
</div>
<script>
     new Vue({
        el: '.aj-table',
        data: {
            info: {},
        },
        mounted() {
            aj.xhr.get('../../iam_api/admin/welcome', json => {
                if (json.status && json.data) {
                    console.log(json.data)
                    this.info = json.data;
                }
            });
        }
     });
</script>
</body>
</html>